﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.EnterpriseLibrary.Data.Sql;
using Microsoft.Practices.EnterpriseLibrary.Data.Configuration;
using MySql.Data.MySqlClient;
using System.Data;
using System.Configuration;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;
using Microsoft.Practices.EnterpriseLibrary.Data;



namespace ComponenteConfiguracion
{
    class DatabaseConfigurationView
    {
        /// <summary>
        /// Default name for the Sybase managed provider.
        /// </summary>
        public const string DefaultOracleProviderName = "System.Data.OracleClient";
        /// <summary>
        /// Default name for the mysql managed provider.
        /// </summary>
        public const string DefaultMySqlProviderName = "MySql.Data.MySqlClient";


    //    private DbProviderMapping GetDefaultMapping(string name, string dbProviderName){

    //    if (DbProviderMapping.DefaultMySqlProviderName.Equals(dbProviderName))    
    //        return defaultMySqlMapping;

    //    if (OracleClientFactory.Instance == providerFactory)
    //        return defaultOracleMapping;

    //    if (AseClientFactory.Instance == providerFactory)
    //        return defaultSybaseMapping;
    //    }

    //    /// <summary>
    //    /// Proveedor de sql server
    //    /// </summary>
    //    private static readonly DbProviderMapping defaultSqlMapping = 
    //    new DbProviderMapping(DbProviderMapping.DefaultSqlProviderName, 
    //    typeof(SqlDatabase));

    //    private static readonly DbProviderMapping defaultGenericMapping = new
    //    DbProviderMapping(DbProviderMapping.DefaultGenericProviderName,
    //    typeof(GenericDatabase));


    //    private static readonly DbProviderMapping defaultSybaseMapping = new
    //       DbProviderMapping(DbProviderMapping.DefaultSybaseProviderName,
    //       typeof(AseDatabase));

    //        private static readonly DbProviderMapping defaultOracleMapping = 
    //        new DbProviderMapping(DbProviderMapping.DefaultOracleProviderName, 
    //        typeof(OracleDatabase));

    //private static readonly DbProviderMapping defaultGenericMapping = 
    //new DbProviderMapping(DbProviderMapping.DefaultGenericProviderName, 
    //typeof(GenericDatabase));

    //private static readonly DbProviderMapping defaultMySqlMapping = 
    //new DbProviderMapping(DbProviderMapping.DefaultMySqlProviderName, 
    //typeof(MySqlDatabase));

    //private IConfigurationSource configurationSource;






    }
}
